3.7.59 \(\int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx\) [659]

Optimal. Leaf size=60 \[ \frac {2 i a}{d \sqrt {e \cos (c+d x)}}+\frac {2 a \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {e \cos (c+d x)}} \]

[Out]

2*I*a/d/(e*cos(d*x+c))^(1/2)+2*a*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),
2^(1/2))*cos(d*x+c)^(1/2)/d/(e*cos(d*x+c))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3596, 3567, 3856, 2720} \begin {gather*} \frac {2 a \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {e \cos (c+d x)}}+\frac {2 i a}{d \sqrt {e \cos (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[c + d*x])/Sqrt[e*Cos[c + d*x]],x]

[Out]

((2*I)*a)/(d*Sqrt[e*Cos[c + d*x]]) + (2*a*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2])/(d*Sqrt[e*Cos[c + d*x]
])

Rule 2720

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ
[{c, d}, x]

Rule 3567

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*((d*Sec[
e + f*x])^m/(f*m)), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3596

Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(d*Co
s[e + f*x])^m*(d*Sec[e + f*x])^m, Int[(a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e,
f, m, n}, x] &&  !IntegerQ[m]

Rule 3856

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rubi steps

\begin {align*} \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx &=\frac {\int \sqrt {e \sec (c+d x)} (a+i a \tan (c+d x)) \, dx}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}}\\ &=\frac {2 i a}{d \sqrt {e \cos (c+d x)}}+\frac {a \int \sqrt {e \sec (c+d x)} \, dx}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}}\\ &=\frac {2 i a}{d \sqrt {e \cos (c+d x)}}+\frac {\left (a \sqrt {\cos (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{\sqrt {e \cos (c+d x)}}\\ &=\frac {2 i a}{d \sqrt {e \cos (c+d x)}}+\frac {2 a \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {e \cos (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
time = 1.04, size = 143, normalized size = 2.38 \begin {gather*} -\frac {\sqrt {2} a \sqrt {e \cos (c+d x)} (-i+\cot (c)) \left (\sqrt {2} \sqrt {\csc ^2(c)}+i \cos (c+d x) \sqrt {1+\cos (2 d x-2 \text {ArcTan}(\cot (c)))} \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec (d x-\text {ArcTan}(\cot (c)))\right ) \sin (c) (\cos (d x)-i \sin (d x)) (-i+\tan (c+d x))}{d e \sqrt {\csc ^2(c)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[c + d*x])/Sqrt[e*Cos[c + d*x]],x]

[Out]

-((Sqrt[2]*a*Sqrt[e*Cos[c + d*x]]*(-I + Cot[c])*(Sqrt[2]*Sqrt[Csc[c]^2] + I*Cos[c + d*x]*Sqrt[1 + Cos[2*d*x -
2*ArcTan[Cot[c]]]]*Csc[c]*HypergeometricPFQ[{1/4, 1/2}, {5/4}, Sin[d*x - ArcTan[Cot[c]]]^2]*Sec[d*x - ArcTan[C
ot[c]]])*Sin[c]*(Cos[d*x] - I*Sin[d*x])*(-I + Tan[c + d*x]))/(d*e*Sqrt[Csc[c]^2]))

________________________________________________________________________________________

Maple [A]
time = 1.23, size = 94, normalized size = 1.57

method result size
default \(\frac {2 \left (-\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a}{\sqrt {-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) e +e}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) d}\) \(94\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(d*x+c))/(e*cos(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/(-2*sin(1/2*d*x+1/2*c)^2*e+e)^(1/2)/sin(1/2*d*x+1/2*c)*(-(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^
2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))+I*sin(1/2*d*x+1/2*c))*a/d

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))/(e*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

e^(-1/2)*integrate((I*a*tan(d*x + c) + a)/sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.08, size = 85, normalized size = 1.42 \begin {gather*} -\frac {2 \, {\left (-2 i \, \sqrt {\frac {1}{2}} a \sqrt {e^{\left (2 i \, d x + 2 i \, c\right )} + 1} e^{\left (\frac {1}{2} i \, d x + \frac {1}{2} i \, c\right )} + {\left (i \, \sqrt {2} a e^{\left (2 i \, d x + 2 i \, c\right )} + i \, \sqrt {2} a\right )} {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right )\right )}}{d e^{\frac {1}{2}} + d e^{\left (2 i \, d x + 2 i \, c + \frac {1}{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))/(e*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

-2*(-2*I*sqrt(1/2)*a*sqrt(e^(2*I*d*x + 2*I*c) + 1)*e^(1/2*I*d*x + 1/2*I*c) + (I*sqrt(2)*a*e^(2*I*d*x + 2*I*c)
+ I*sqrt(2)*a)*weierstrassPInverse(-4, 0, e^(I*d*x + I*c)))/(d*e^(1/2) + d*e^(2*I*d*x + 2*I*c + 1/2))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} i a \left (\int \left (- \frac {i}{\sqrt {e \cos {\left (c + d x \right )}}}\right )\, dx + \int \frac {\tan {\left (c + d x \right )}}{\sqrt {e \cos {\left (c + d x \right )}}}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))/(e*cos(d*x+c))**(1/2),x)

[Out]

I*a*(Integral(-I/sqrt(e*cos(c + d*x)), x) + Integral(tan(c + d*x)/sqrt(e*cos(c + d*x)), x))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))/(e*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)*e^(-1/2)/sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

Mupad [B]
time = 0.56, size = 74, normalized size = 1.23 \begin {gather*} \frac {2\,a\,\sqrt {\cos \left (c+d\,x\right )}\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d\,\sqrt {e\,\cos \left (c+d\,x\right )}}+\frac {a\,\cos \left (c+d\,x\right )\,\sqrt {e\,\cos \left (c+d\,x\right )}\,4{}\mathrm {i}}{d\,e\,\left (\cos \left (2\,c+2\,d\,x\right )+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(c + d*x)*1i)/(e*cos(c + d*x))^(1/2),x)

[Out]

(2*a*cos(c + d*x)^(1/2)*ellipticF(c/2 + (d*x)/2, 2))/(d*(e*cos(c + d*x))^(1/2)) + (a*cos(c + d*x)*(e*cos(c + d
*x))^(1/2)*4i)/(d*e*(cos(2*c + 2*d*x) + 1))

________________________________________________________________________________________